
<div class="breadcrumbs" id="breadcrumbs">
	<script type="text/javascript">
		try {
			ace.settings.check('breadcrumbs', 'fixed')
		} catch (e) {
		}
	</script>

	<ul class="breadcrumb">
		<li><i class="icon-home home-icon"></i> <a href="#">首页</a></li>
		<li><a href="#">基础信息管理</a></li>
		<li class="active">渠道信息列表</li>
	</ul>
</div>
<div class="page-content">
	<div class="page-header">
		<h1>渠道信息列表</h1>
	</div><!-- end /.page-header -->
	
	<div class="row">
		<div class="col-xs-14">
			<table id="grid-table"></table>
			<div id="grid-pager"></div>
			<script type="text/javascript">
				var $path_base="${basePath}" 	//this will be userd in gritter alerts containing images
			</script>
		</div><!-- end /.col -->
	</div><!-- end /.row -->
	
</div><!-- end /.page-content -->
<script type="text/javascript">
	jQuery(function($){
		var grid_selector = "#grid-table";
		var pager_selector = "#grid-pager";
		jQuery(grid_selector).jqGrid({
			url : '${basePath}/channel/list',
			datatype: 'json',
			mytype : 'POST',
			height: 400,
			colNames:['编号','名称','联系人','联系电话','Email','地址','渠道说明','创建时间','是否有效','操作'],
			colModel:[
			          {name:'id',index:'id',width:30,sorttype:"int",editable:false/*,stype:'select',searchoptions:{value:[1,2,3,4]}*/},
			          {name:'name',index:'name',width:150,sorttype:"text",editable:true,editrules:{required:true}},
			          {name:'contact',index:'contact',sortable:false,width:100,editable:true,search:false},
			          {name:'phone',index:'phone',sortable:false,width:80,editable:true,search:false},
			          {name:'email',index:'email',sortable:false,width:80,editable:true,search:false},
			          {name:'address',index:'address',sortable:false,width:80,editable:true,search:false},
			          {name:'remark',index:'remark',sortable:false,width:80,editable:true,edittype:"textarea",editoptions:{maxlength:200},search:false},
			          {name:'createTime',index:'createTime',sortable:false,width:150,editable:false,search:false},
			          {name:'status',index:'status',formatter:function(cellvalue,options,rowObject){if(cellvalue==1){return "是";}if(cellvalue==0){return "否";}},edittype:"select",editoptions:{value:'1:是;0:否'}, width:60,editable:true,search:false},
			          {name:'myac',index:'',width:80, fixed:true, sortable:false,resize:false,
			        	  formatter:'actions',
			        	  formatoptions:{
			        		  keys:false,
			        		  delbutton:false,
			        		  delOptions:{recreateForm:true, beforeShowForm:beforeDeleteCallback},
							  editformbutton:true, editOptions:{recreateForm: true, beforeShowForm:beforeEditCallback,closeAfterEdit: true}
			        	  },
						  search:false,viewable:false}
			          ],
			         	jsonReader:{repeatitems:false},
			          	viewrecords : true,
						rowNum:10,
						rowList:[10,20,30,50,100,1000],
						pager : pager_selector,
						altRows: true,
						loadtext:'正在加载数据...',
						multiselect: true,
				        multiboxonly: true,
				        loadComplete:function(){
				        	var table = this;
				        	setTimeout(function(){
								updatePagerIcons(table);
								enableTooltips(table);
				        	},0);
				        },
				        editurl:"${basePath}/channel/cud",
				        caption:"渠道列表",
				        autowidth:true
		});
		//引入jqgrid通用js 脚本
		<#include "/WEB-INF/common/_jqGrid.html"/>
	});
</script>